<%
# Issue Extensions plugin for Redmine
# Copyright (C) 2010  Takashi Takebayashi
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-%>
<div id="issue_extension_settings">
<%
@issue_extension_status_flow = IssueExtensionsStatusFlow.find_or_create(@project.id, User.current.id)
@statuses = IssueStatus.find(:all, :order => 'position') %>
<% labelled_tabular_form_for :setting, @issue_extension_status_flow,
                             :url => {:controller => 'issue_extensions_settings',
                             :action => 'update', :id => @project, :tab => 'issue_extensions',
                             :partial => 'issue_extensions_settings/update',
                             :setting_id => @issue_extension_status_flow.id} do |f| %>
    <%= error_messages_for 'issue_extensions_setting' %>
    <div class="box">
      <b><%= h l(:text_changed_from_the_alpha_to_the_beta) %></b>
      <p><%= f.select :old_status_id, @statuses.collect {|status| [status.name, status.id]}, :required => true %></p>
      <p><%= f.select :new_status_id, @statuses.collect {|status| [status.name, status.id]}, :required => true %></p>
    </div>
    <%= submit_tag l(:button_update) %>
<% end %>
</div>